﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomeSite.Master" Inherits="System.Web.Mvc.ViewPage<TimeTableManagement.Entities.Tb_Role>" %>

<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" 
        CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" 
        GroupBoxCaptionOffsetY="-28px" HeaderText="Role Detail"
        SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
        <ContentPaddings Padding="14px" />
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <span class="style1">
    <div class="display-field">Rolename: <%: Html.DisplayFor(model => model.rolename) %></div>
    <div class="display-field">Description: <%: Html.DisplayFor(model => model.description) %></div>
    </span>
    <% 
        int id = Model.id;
        TimeTableManagement.Entities.Tb_Role _role = new TimeTableManagement.Entities.Tb_Role();
        List<TimeTableManagement.Entities.Role> list = _role.getRoleModule(id);  
    %>
    
    
    <div class="display-field">
        <table style="color:#333333;width:100%;border-collapse:collapse;">
            <tr style="color:White;background-color:#507CD1;font-weight:bold;">
                <td class="style5">
                    Module</td>
                <td class="style5">
                    View</td>
                <td class="style5">
                    Create</td>
                <td class="style5">
                    Edit</td>
                <td class="style5">
                    Delete</td>
            </tr>
            <% int i =0 ; foreach (TimeTableManagement.Entities.Role r in list)
               { i++; %>
               <% if (i % 2 != 0)
                  { %>
            <tr style="background-color:#EFF3FB;">
            <% }
                  else
                  { %>
                  <tr style="background-color:White;">
            <% } %>
                <td class="style2">
                    <%= r.t %></td>
                <td class="style5">
                
                    <%= new TimeTableManagement.Entities.Tb_Role().getPermission(r.r,"view") %></td>
                <td class="style5">
                    <%= new TimeTableManagement.Entities.Tb_Role().getPermission(r.r, "create")%></td>
                <td class="style5">
                    <%= new TimeTableManagement.Entities.Tb_Role().getPermission(r.r, "edit")%></td>
                <td class="style5">
                    <%= new TimeTableManagement.Entities.Tb_Role().getPermission(r.r, "delete") %></td>
            </tr>
            <% } %>
        </table>
    </div>
<p><%: Html.ActionLink("Edit", "Edit", new { id=Model.id }) %> </p>
</dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            font-size: medium;
        }

        .style5
        {
            height: 18px;
            border-style:dotted;
            border-color:Aqua;
            text-align: center;
        }
        .style2
        {
            height: 18px;
            border:1;
            text-align: left;
        }
        </style>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="leftmenu" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="menuright" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Footer" runat="server">
</asp:Content>
